﻿<%@ Page Title="查询药品销售金额" Language="C#" MasterPageFile="~/Master/MasterPage.master" AutoEventWireup="true" CodeBehind="SellByAmount.aspx.cs" Inherits="HZ.Supervise.Web.Demo.SellByAmount" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<%@ Register Src="~/Common/AreaControls.ascx" TagName="AreaControl" TagPrefix="uc3" %>
    <link href="../Style/demoCss.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript">
function mSift_SeekTp(oObj,nDire){if(oObj.getBoundingClientRect&&!document.all){var oDc=document.documentElement;switch(nDire){case 0:return oObj.getBoundingClientRect().top+oDc.scrollTop;case 1:return oObj.getBoundingClientRect().right+oDc.scrollLeft;case 2:return oObj.getBoundingClientRect().bottom+oDc.scrollTop;case 3:return oObj.getBoundingClientRect().left+oDc.scrollLeft;}}else{if(nDire==1||nDire==3){var nPosition=oObj.offsetLeft;}else{var nPosition=oObj.offsetTop;}if(arguments[arguments.length-1]!=0){if(nDire==1){nPosition+=oObj.offsetWidth;}else if(nDire==2){nPosition+=oObj.offsetHeight;}}if(oObj.offsetParent!=null){nPosition+=mSift_SeekTp(oObj.offsetParent,nDire,0);}return nPosition;}}
function mSift(cVarName,nMax){this.oo=cVarName;this.Max=nMax;}
mSift.prototype={
	Varsion:'v2010.10.29 by AngusYoung | mrxcool.com',
	Target:Object,
	TgList:Object,
	Listeners:null,
	SelIndex:0,
	Data:[],
	ReData:[],
	Create:function(oObj){
		var _this=this;
		var oUL=document.createElement('ul');
		oUL.style.display='none';
		oObj.parentNode.insertBefore(oUL,oObj);
		_this.TgList=oUL;
		oObj.onkeydown=oObj.onclick=function(e){_this.Listen(this,e);};
		oObj.onblur=function(){setTimeout(function(){_this.Clear();},100);};
	},
	Complete:function(){},
	Select:function(){
		var _this=this;
		if(_this.ReData.length>0){
			_this.Target.value=_this.ReData[_this.SelIndex].replace(/\*/g,'*').replace(/\|/g,'|');
			_this.Clear();
		}
		setTimeout(function(){_this.Target.focus();},10);
		_this.Complete();
	},
	Listen:function(oObj){
		var _this=this;
		_this.Target=oObj;
		var e=arguments[arguments.length-1];
		var ev=window.event||e;
		switch(ev.keyCode){
			case 9://TAB
				return;
			case 13://ENTER
				_this.Target.blur();
				_this.Select();
				return;
			case 38://UP
				_this.SelIndex=_this.SelIndex>0?_this.SelIndex-1:_this.ReData.length-1;
				break;
			case 40://DOWN
				_this.SelIndex=_this.SelIndex<_this.ReData.length-1?_this.SelIndex+1:0;
				break;
			default:
				_this.SelIndex=0;
		}
		if(_this.Listeners){clearInterval(_this.Listeners);}
		_this.Listeners=setInterval(function(){
			_this.Get();
		},10);
	},
	Get:function(){
		var _this=this;
		if(_this.Target.value==''){_this.Clear();return;}
		if(_this.Listeners){clearInterval(_this.Listeners);};
		_this.ReData=[];
		var cResult='';
		for(var i=0;i<_this.Data.length;i++){
			if(_this.Data[i].toLowerCase().indexOf(_this.Target.value.toLowerCase())>=0){
				_this.ReData.push(_this.Data[i]);
				if(_this.ReData.length==_this.Max){break;}
			}
		}
		var cRegPattern=_this.Target.value.replace(/\*/g,'*');
		cRegPattern=cRegPattern.replace(/\|/g,'|');
		cRegPattern=cRegPattern.replace(/\+/g,'\\+');
		cRegPattern=cRegPattern.replace(/\./g,'\\.');
		cRegPattern=cRegPattern.replace(/\?/g,'\\?');
		cRegPattern=cRegPattern.replace(/\^/g,'\\^');
		cRegPattern=cRegPattern.replace(/\$/g,'\\$');
		cRegPattern=cRegPattern.replace(/\(/g,'\\(');
		cRegPattern=cRegPattern.replace(/\)/g,'\\)');
		cRegPattern=cRegPattern.replace(/\[/g,'\\[');
		cRegPattern=cRegPattern.replace(/\]/g,'\\]');
		cRegPattern=cRegPattern.replace(/\\/g,'\\\\');
		var cRegEx=new RegExp(cRegPattern,'i');
		for(var i=0;i<_this.ReData.length;i++){
			if(_this.Target.value.indexOf('*')>=0){
				_this.ReData[i]=_this.ReData[i].replace(/\*/g,'*');
			}
			if(_this.Target.value.indexOf('|')>=0){
				_this.ReData[i]=_this.ReData[i].replace(/\|/g,'|');
			}
			cResult += '<li style="padding:0 5px;line-height:20px;cursor:default;overflow:hidden;" onmouseover="' +
			_this.oo+'.ChangeOn(this);'+_this.oo+'.SelIndex='+i+';" onmousedown="'+_this.oo+'.Select();">'
			+ _this.ReData[i].replace(cRegEx, function(s) { return '<span style="font-weight:bold;font-style:normal;color:#aecef5;">' + s + '</span>'; }); +'</li>';
		}
		if(cResult==''){_this.Clear();}
		else{
			_this.TgList.innerHTML=cResult;
			_this.TgList.style.cssText = 'display:block;position:absolute;background:#fff;border:#9f9a9a solid 1px;margin:-1px 0 0;padding: 5px;list-style:none;font-size:12px;overflow:hidden;';
			_this.TgList.style.top=mSift_SeekTp(_this.Target,2)+'px';
			_this.TgList.style.left=mSift_SeekTp(_this.Target,3)+'px';
			_this.TgList.style.width=_this.Target.offsetWidth-12+'px';
		}
		var oLi=_this.TgList.getElementsByTagName('li');
		if(oLi.length>0){
		    oLi[_this.SelIndex].style.cssText = 'background:#f0f0f0;padding:0 5px;line-height:20px;cursor:default;color:#000;overflow:hidden;';
		}
	},
	ChangeOn:function(oObj){
		var oLi=this.TgList.getElementsByTagName('li');
		for(var i=0;i<oLi.length;i++) {
		    oLi[i].style.cssText = 'padding:0 5px;line-height:20px;cursor:default;overflow:hidden;';
		}
		oObj.style.cssText = 'background:#36c;padding:0 5px;line-height:20px;cursor:default;color:#fff;overflow:hidden;';
	},
	Clear:function(){
		var _this=this;
		if(_this.TgList){
			_this.TgList.style.display='none';
			_this.ReData=[];
			_this.SelIndex=0;
		}
	}
}
</script>

<script type="text/javascript" language="javascript">
    function isSelected(selID) {
       
        var typeName;
        var typeID = document.getElementById(selID);

        for (i = 0; i < typeID.length; i++) {
            if (typeID[i].selected == true) {
                typeName = typeID[i].innerText;
                
            }
        } 
        return  typeName ;
        
    }
    function Query() {
        var hosname = document.getElementById("hosName");
        
      //  var hosType = document.getElementById("hosType");
        var medType = document.getElementById("medType");
        var provice = document.getElementById("ctl00_ContentPlaceHolder1_AreaControl1_ddlProvice");
        var city = document.getElementById("ctl00_ContentPlaceHolder1_AreaControl1_ddlCity");
        var country = document.getElementById("ctl00_ContentPlaceHolder1_AreaControl1_ddlCountry");
        var dataS = document.getElementById("dataS");
        var dataE = document.getElementById("dataE");
        var proName = document.getElementById("proName");
        var proId = document.getElementById("proId");
        var modName = document.getElementById("modName");
        var a = "";
        a += "<div class='swhere'>" +isSelected("ctl00_ContentPlaceHolder1_AreaControl1_ddlProvice") + "</div>";
        var City = isSelected("ctl00_ContentPlaceHolder1_AreaControl1_ddlCity");

        if (City != "所在地市") {
            a += "<div class='swhere'>" + City + "</div>";
        }
        var country = isSelected("ctl00_ContentPlaceHolder1_AreaControl1_ddlCountry");
        if (country != "所在县区") {
            a += "<div class='swhere'>" + country + "</div>";
        }
        a += "<div class='swhere'>" + isSelected("hosType") + "</div>";
        if (dataS.value != "") {
            a += "<div class='swhere'>入库时间从：" + dataS.value + "</div>";
 
        }
        else {
            a += "<div class='swhere'>从开始</div>";
 
        }
        if (dataE.value != "") {

            a += "<div class='swhere'>到：" + dataE.value + "</div>";
        }
        else {
            a += "<div class='swhere'>到现在</div>";
        }
        var medType = isSelected("medType");
        if (medType != "所有药品类型") {
            a += "<div class='swhere'> " + medType + "</div>";
        
        }
        
        if (hosname.value != "") {
            a += "<div class='swhere'> "+hosname.value+"</div>";
        }
       
       
        if (proId.value != "") {
            a += "<div class='swhere'> 药品流水号是" + proId.value + "</div>";
        }
        if (proName.value != "") {
            a += "<div class='swhere'> 的" + proName.value + "</div>";
        }
        if (modName.value != "") {
            a += "<div class='swhere'> " + modName.value + "</div>";
        }
        a += "<div class='swhere'>的销售金额总计：32345.23元</div>";
        
        var cc = document.getElementById("divwhere");
        cc.innerHTML = a;

    }
    function GaoJI() {
        var btngj = document.getElementById("gjId")
        //        alert(btngj.style.display);
        if (btngj.style.display == "block") {
            btngj.style.display = "none";
        }
        else {
            btngj.style.display = "block";

        }
    }
</script>
 <div>
    <div class="search">
        <div class="search_item">
            <table>
               <tr>
                    <th>地　　区：</th>
                    <td colspan="4"> <uc3:areacontrol ID="AreaControl1" runat="server" /></td>
                </tr>
                <tr>  
                    <th>医院类型：</th>
                    <td>
                        <select id="hosType">
                           <option>所有医疗机构</option>
                           <option>二三级医疗机构</option>
                           <option>社区医疗机构</option>
                           <option>基层医疗机构</option>
                           <option>乡镇医疗机构</option>
                           
                       </select>
                    </td>
                    
                   <th>医院名称：</th>
                    <td><input type="text" id="hosName"  /></td>
                  
                    <th>入库时间起：</th>
                    <td><input type="text"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})" id="dataS" /></td>
                    <th>
                    入库时间止：
                    </th>
                    <td>
                     <input type="text"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"  id="dataE"/>&nbsp;&nbsp;&nbsp;&nbsp;
                      <input type="button" value="查询" class="btn"　id="Button1" onclick="Query()" />
                                
                                <input type="button" value="高级查询" class="btn"　id="Button2" onclick="GaoJI()" />
                     </td>
                    
               </tr>
                  <tr id="gjId" style="display:none;">
                    <td colspan="10" align="left">
                        <table cellpadding=0 cellspacing=0 border="0px">
                            <tr>   
                                <th>药品类型：</th>
                                <td>
                                    <select id="medType">
                                       <option>所有药品类型</option>
                                       <option>基本药物</option>
                                       <option>非基本药物</option>
                                       
                                   </select>
                                </td>
                                 
                           
                                
                                <th>流　水 号：</th>
                                <td><input type="text" id="proId"/></td>
                                
                                
                                <th>通　用　名：</th>
                                <td><input type="text"  id="proName" /></td>
                                <th>剂　　　型：</th>
                                <td><input type="text" id="modName" /></td>
                           </tr>
                            <tr>   
                                <th>采购规格：</th>
                                <td>
                                    <select id="Select1">
                                       <option>所有药品类型</option>
                                       <option>基本药物</option>
                                       <option>非基本药物</option>
                                       
                                   </select>
                                </td>
                                 
                           
                                
                                <th>生产企业：</th>
                                <td><input type="text" id="Text1"/></td>
                                
                                
                                <th>生产企业：</th>
                                <td><input type="text"  id="Text2" /></td>
                                <th> </th>
                                <td>
                                </td>
                                <th> 
                                
                               
                                </th>
                           </tr>
                        </table>
                    </td>
                </tr>
                 
             
            </table>
        </div>
        <div>
            
        </div>
    </div >
       <div class="searchwhere" id="divwhere"> &nbsp; <div class='swhere'>全省所有医疗机构的销售金额总计：32345456234.23元</div>
       </div>
        <div>
	<table class="mainlist" cellspacing="0" rules="all" border="1" id="ctl00_ContentPlaceHolder1_gvwGoodsTotal" style="border-collapse:collapse;">
		<tr>
			<th scope="col" style="width:30px;">序号</th><th scope="col">流水号</th><th scope="col">通用名</th><th scope="col">剂型</th><th scope="col">生产企业</th><th scope="col">
            配送企业</th><th scope="col">采购规格</th><th scope="col">采购单位</th><th scope="col">
            销售金额</th>
		</tr><tr class="row">
			<td>
                        1
                    </td><td>10011</td><td>氟轻松维B6</td><td>软膏剂_软膏剂</td><td>湖南天龙制药有限公司</td><td>湖南天龙制药有限公司</td><td>10g*1支/支</td><td>支</td><td>22.200</td>
		</tr><tr class="alter">
			<td>
                        2
                    </td><td>1004</td><td>小儿清热止咳口服液</td><td>口服液</td><td>哈尔滨一洲制药有限公司</td><td>哈尔滨一洲制药有限公司</td><td>每支装10ml*10支/盒</td><td>盒</td><td>1021.250</td>
		</tr><tr class="row">
			<td>
                        3
                    </td><td>10100</td><td>双氯芬酸</td><td>缓释片_缓释片</td><td>深圳致君制药有限公司</td><td>深圳致君制药有限公司</td><td>0.1g*24片/盒</td><td>盒</td><td>482.000</td>
		</tr><tr class="alter">
			<td>
                        4
                    </td><td>10106</td><td>双氯芬酸</td><td>缓释片_缓释片</td><td>深圳致君制药有限公司</td><td>深圳致君制药有限公司</td><td>0.1g*10片/盒</td><td>盒</td><td>51.900</td>
		</tr><tr class="row">
			<td>
                        5
                    </td><td>10107</td><td>双氯芬酸</td><td>缓释片_缓释片</td><td>深圳致君制药有限公司</td><td>深圳致君制药有限公司</td><td>0.1g*6片/盒</td><td>盒</td><td>63.400</td>
		</tr><tr class="alter">
			<td>
                        6
                    </td><td>10141</td><td>氯沙坦钾</td><td>片剂_薄膜衣片</td><td>重庆科瑞制药有限责任公司</td><td>重庆科瑞制药有限责任公司</td><td>50mg*7片/盒</td><td>盒</td><td>724.500</td>
		</tr><tr class="row">
			<td>
                        7
                    </td><td>1018</td><td>氟康唑</td><td>注射液</td><td>山西普德药业股份有限公司</td><td>山西普德药业股份有限公司</td><td>5ml:0.2g*1支/支</td><td>支</td><td>404.600</td>
		</tr><tr class="alter">
			<td>
                        8
                    </td><td>10305</td><td>50/50混合重组人胰岛素注射液</td><td>注射液</td><td>珠海联邦制药股份有限公司</td><td>珠海联邦制药股份有限公司</td><td>3ml:300IU*1瓶/瓶</td><td>瓶</td><td>3225.000</td>
		</tr><tr class="row">
			<td>
                        9
                    </td><td>10366</td><td>附子理中丸</td><td>浓缩丸</td><td>芜湖张恒春药业有限公司</td><td>芜湖张恒春药业有限公司</td><td>△*200丸/瓶</td><td>瓶</td><td>170.000</td>
		</tr><tr class="alter">
			<td>
                        10
                    </td><td>10371</td><td>香砂养胃丸</td><td>浓缩丸</td><td>芜湖张恒春药业有限公司</td><td>芜湖张恒春药业有限公司</td><td>△*200丸/瓶</td><td>瓶</td><td>111.600</td>
		</tr>
	</table>

</div>
 <div id="ctl00_ContentPlaceHolder1_AspNetPager1" class="pageContent">
<div class="pageContent" style="width:40%;float:left;">
	第 <font color='red'><b>1</b></font>/44 页 每页 10 条 共 433 条
</div><div class="pageContent" style="width:60%;float:left;">
	<a disabled="disabled" style="margin-right:5px;">首页</a><a disabled="disabled" style="margin-right:5px;">上一页</a><span style="margin-right:5px;font-weight:Bold;color:red;">1</span><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$AspNetPager1','2')" style="margin-right:5px;">2</a><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$AspNetPager1','3')" style="margin-right:5px;">3</a><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$AspNetPager1','4')" style="margin-right:5px;">4</a><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$AspNetPager1','5')" style="margin-right:5px;">5</a><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$AspNetPager1','6')" style="margin-right:5px;">6</a><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$AspNetPager1','7')" style="margin-right:5px;">7</a><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$AspNetPager1','8')" style="margin-right:5px;">8</a><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$AspNetPager1','9')" style="margin-right:5px;">9</a><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$AspNetPager1','10')" style="margin-right:5px;">10</a><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$AspNetPager1','11')" style="margin-right:5px;">...</a><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$AspNetPager1','2')" style="margin-right:5px;">下一页</a><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$AspNetPager1','44')" style="margin-right:5px;">尾页</a>&nbsp;&nbsp;<input type="text" value="1" name="ctl00$ContentPlaceHolder1$AspNetPager1_input" id="ctl00$ContentPlaceHolder1$AspNetPager1_input" onkeydown="ANP_keydown(event,'ctl00$ContentPlaceHolder1$AspNetPager1_btn');" style="width:30px;" /><input type="submit" value="go" name="ctl00$ContentPlaceHolder1$AspNetPager1" id="ctl00$ContentPlaceHolder1$AspNetPager1_btn" onclick="if(ANP_checkInput('ctl00$ContentPlaceHolder1$AspNetPager1_input',44)){__doPostBack('ctl00$ContentPlaceHolder1$AspNetPager1','')} else{return false}" />
</div>
</div>

    </div>
    <script type="text/javascript">
        //建立实例，第一个参数是实例对象的名称，第二个是最多显示的数量
        var oo = new mSift('oo', 20);
        //数据
        oo.Data = ['吉林市船营区欢喜乡卫生院', '吉林经济技术开发区化纤社区卫生服务中心', '吉林市昌邑区孤店子镇卫生院', '吉林市永吉县一拉溪镇卫生院', '吉林市永吉县北大湖镇中心卫生院', '吉林市船营区搜登站镇太平卫生院', '吉林市船营区青岛街道社区卫生服务中心', '吉林市永吉县黄榆乡卫生院'];
        //指定文本框对象建立特效
        oo.Create(document.getElementById('hosName'));
        var oxo = new mSift('oxo', 20);
        oxo.Data = ['葡萄糖', '葡萄糖氯化钠', '葡萄糖酸钙', '葡萄糖酸钙锌', '葡萄糖酸锌', '氯苯那敏', '氯丙嗪', '氯化钾', '氯化钠', '氯解磷定', '氯雷他定', '氯霉素', '氯沙坦钾'];
        oxo.Create(document.getElementById('proName'));
</script>
</asp:Content>
